<extend name="Layout/index" />

<block name="link">
    <script src="__PUBLIC__/Js/jquery-1.8.3.min.js"></script>
</block>

<block name="breadcrumb-01">
    <li>
        <i class="icon-home home-icon"></i>
        <a href="#">首页</a>
    </li>
    <li class="active">评价</li>
</block>

<block name="breadcrumb-02">
    <h1>
        评价
        <small>
            <i class="icon-double-angle-right"></i>
             评论列表
        </small>
    </h1>
</block>    
<block name="main">
    <div class=".table-responsive">
        <table id="table_comment" class="table table-bordered table-hover" style="table-layout:fixed">
            <tr class="active">
                <th style='vertical-align: middle;text-align: center;' width="5%">序号</th>
                <th style='vertical-align: middle;text-align: center;' width="15%">房屋名</th>
                <th style='vertical-align: middle;text-align: center;' width="10%">用户名</th>
                <th style='vertical-align: middle;text-align: center;' width="*">评论内容</th>
                <th style='vertical-align: middle;text-align: center;' width="10%">评论时间</th>
                <th style='vertical-align: middle;text-align: center;' width="25%">操作</th>
            </tr>
            <volist name="list" id="vo">
            <tr class="success">
                <td style='vertical-align: middle;text-align: center;'><{$vo['id']}></td>
                <td style='vertical-align: middle;text-align: center;'><{$vo['name']}></td>
                <td style='vertical-align: middle;text-align: center;'><{$vo['nickname']}></td>
                <td style='vertical-align: middle;text-align: center;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;' class="look_more"><{$vo['desc']}></td>
                <td style='vertical-align: middle;text-align: center;'><{$vo['createtime']}></td>
                <td style='vertical-align: middle;text-align: center;'>
                    <a href="<{:U('delete', array('id'=>$vo['id']))}>" class="btn btn-warning">删除</a>
                    <button id="btn_comment" class="btn-info">点击查看详情</button> 
                </td>
            </tr>
            </volist>
        </table> <!--END table-->
    </div> <!--END responsive-->
    <!-- 分页显示 -->
    <{$page}>
    <script>
        $(".success .btn-info").click(function(){
            var a =$(this).parent().parent().find(".look_more");
            var b = a.css("white-space");
            if(b=="nowrap"){
                a.css("white-space","normal");
                a.css("overflow","block");
                a.css("text-overflow","clip");
                $(this).html("再次点击收起");
            }else{
                a.css("white-space","nowrap");
                a.css("overflow","hidden");
                a.css("text-overflow","ellipsis");
                $(this).html("点击查看详情");
            }
        })
    </script>
</block>